<?php

namespace app\api\validate;

use think\Validate;

class Media extends Validate
{

    /**
     * 验证规则
     */
    protected $rule = [
        'media_id' => 'require',
        'title|标题' => 'require',
        'content|详情' => 'require',
        'shooting_time|拍摄时间' => 'require|date',
        'type|类型' => 'require',
        'cate_ids|标签类别' => 'require'
    ];
 
    /**
     * 场景
     */
    protected $scene = [
        'add' => ['title', 'type','cate_ids', 'shooting_time'],
        'edit' => ['media_id', 'title', 'type', 'cate_ids', 'shooting_time'],
    ];
}
